package com.tjmc.tiomsresource;

import com.tjmc.tiomsresource.schedule.ResCollectSchedule;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableScheduling
@SpringBootApplication
@MapperScan("com.tjmc.tiomscore.dao")
public class TiomsResourceApplication implements CommandLineRunner {

    @Autowired
    private ResCollectSchedule resCollectSchedule;

    public static void main(String[] args) {
        SpringApplication.run(TiomsResourceApplication.class, args);
    }

    @Override
    public void run(String... strings) throws Exception {
        resCollectSchedule.collectOmcResource();
    }
}
